
package physiqueEngine.gui;

import javax.swing.JLabel;
import javax.swing.JTextField;

public class LabeledField
{
    private JLabel label = null;
    private JTextField field = null;

    public LabeledField()
    {
        this.label = new JLabel();
        this.field = new JTextField();
    }

    public LabeledField(String labelText)
    {
        this();

        this.setLabelText(labelText);
    }

    public JLabel getLabel()
    {
        return this.label;
    }

    public JTextField getField()
    {
        return this.field;
    }

    public String getFieldText()
    {
        return this.field.getText();
    }
    
    public void setFieldText(String text)
    {
        this.field.setText(text);
    }

    public void setLabelText(String text)
    {
        this.label.setText(text);
    }
}
